//
//  ZDAlertSheetView.m
//  ZDPension
//
//  Created by 刘甲奇 on 2017/6/16.
//  Copyright © 2017年 maker. All rights reserved.
//

#import "ZDAlertSheetView.h"

@interface ZDAlertSheetView()

@property (weak, nonatomic) IBOutlet UIImageView *icon;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *iconTop;

/**
 选中的索引
 */
@property (nonatomic,assign) NSInteger selectIndex;
/**
 <#Description#>
 */
@property(nonatomic,strong)alertButtonClickBlock block;

@end

@implementation ZDAlertSheetView

- (void)awakeFromNib
{
    [super awakeFromNib];
    self.selectIndex = 1;
    
}
- (void)alertButtonClick:(alertButtonClickBlock)block
{
    _block = block;
}
- (IBAction)inStoreClick:(UIButton *)sender
{
    [UIView animateWithDuration:0.5 animations:^{
        self.iconTop.constant = 65;
    }];
    self.selectIndex = 1;
}
- (IBAction)doorServiceClick:(UIButton *)sender
{
    [UIView animateWithDuration:0.5 animations:^{
        self.iconTop.constant = 115;
    }];
    self.selectIndex = 2;
}
- (IBAction)sureClick:(UIButton *)sender
{
    _block(self.selectIndex);
}
- (IBAction)cancelClick:(UIButton *)sender
{
    _block(0);
}


@end
